
package desktopapplication1;

import Modele.State;

/**
 * See wikipedia
 */

class Originator {
    /*
    private State state;
    // The class could also contain additional data that is not part of the
    // state saved in the memento.

    public void set(State state) {
        System.out.println("Originator: Setting state to " + state);

        this.state = state;
    }

    public State saveToMemento() {
        System.out.println("Originator: Saving to Memento.");
        return new State(state);
    }

    public void restoreFromMemento(State s) {
    	State memento = s;
        state = memento.getSavedState();
        System.out.println("Originator: State after restoring from Memento: " + state);
    }
     *
     */
/*
    public static class Memento {
        private final String state;

        private Memento(String stateToSave) {
            state = stateToSave;
        }

        private String getSavedState() {
            return state;
        }
    }
*/
 }
